{% load i18n %}
<div class="col-sm-3">
    <div class="card">
        {% load thumbnail %}
        {% thumbnail item.main_image.get_image_x300 "300x300" as thumb %}
             <img class="card-img-top" src="{{ thumb.url }}" width="{{ thumb.width }}" height="{{ thumb.height }}" alt="" />
        {% endthumbnail %}

        <div class="card-body">
            <h5 class="card-title">{{ item.name }}</h5>
            <p class="card-text">{{ item.text }}</p>
            <a href="{% url 'catalog:item_detail' item_index=item.id %}" class="btn btn-primary">{% trans "More details" %}</a>
        </div>
    </div>
</div>